﻿using RAP.Framework.Libary.DomTemplateBuilder.Interface;

namespace RAP.Framework.Libary.DomTemplateBuilder.Handler.Conditional
{
	/// <summary>
	/// 判断是否为null或Empty的Handler（值为null或集合元素个数为0或字符串为空返回true）
	/// </summary>
	public class IsNullOrEmptyHandler : IsEmptyHandler
    {
		protected override bool DoCompareValue ( object propertyValue, object rootParamObject, object parentParamObject, ITemplateRenderContext context )
		{
			if ( propertyValue == null )
			{
				return true;
			}
			return base.DoCompareValue ( propertyValue, rootParamObject, parentParamObject, context );
		}
    }
}
